package org.mspring.crm.entity.permission;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * McrmRolesAuthorities entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "role_group")
public class RoleGroup implements java.io.Serializable {

    private RoleGroupPK roleGroupPK;

    /**
     * 
     */
    public RoleGroup() {
        // TODO Auto-generated constructor stub
    }

    /**
     * @param roleGroupPK
     */
    public RoleGroup(RoleGroupPK roleGroupPK) {
        super();
        this.roleGroupPK = roleGroupPK;
    }

    @EmbeddedId
    @AttributeOverrides( { @AttributeOverride(name = "roleId", column = @Column(name = "role_id", nullable = false)), @AttributeOverride(name = "groupId", column = @Column(name = "group_id", nullable = false)) })
    public RoleGroupPK getRoleGroupPK() {
        return roleGroupPK;
    }

    public void setRoleGroupPK(RoleGroupPK roleGroupPK) {
        this.roleGroupPK = roleGroupPK;
    }

}